

layui.use(['laydate', 'form'],
    function () {
        var laydate = layui.laydate;

        let form = layui.form;
        //这里的findAll应该只查询出is_show为1的数据
        //如果在菜系管理列表里面，查询findAll，应该查询所有
        let res = myAjax("/back/cuisine/findAll", {isShow: 1});
        findAll(res.data);

    });

function findAll(data) {
    layui.use(['form'],
        function () {
            var form = layui.form;
            let html = '';
            for (let i = 0; i < data.length; i++) {
                html += '<option value="' + data[i].id + '">' + data[i].name + '</option>';
            }
            $("#cuisine").html(html);
            form.render();
        });
}